package com.demo.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@Schema(name = "Order", description = "订单实体，包含用户、商品、数量等信息")
public class Order {
    @Schema(description = "订单ID", example = "1001", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long id;

    @Schema(description = "下单用户ID", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long userId;

    @Schema(description = "商品ID", example = "101", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long productId;

    @Schema(description = "购买数量", example = "2", requiredMode = Schema.RequiredMode.REQUIRED, minimum = "1")
    private Integer quantity;

    @Schema(description = "订单状态", example = "PAID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = {"CREATED", "PAID", "SHIPPED", "CANCELLED"})
    private String status;
} 